home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 41
/
Aminet 41 (2001)(Schatztruhe)[!][Feb 2001].iso
/
Aminet
/
disk
/
cache
/
fda-upd.lha
/
FDA_update
/
Install_FDA-upd
< prev
next >
Wrap
Text File
|
2000-11-01
|
8KB
|
198 lines
;========================================================================================;
;= $VER: 2.4 Future Drive Accelerator FullVersion Installscript by Martin Tauchmann =;
;= based on Update_MyProgram V1 written by Thomas Baust
;========================================================================================;
(set #Ver ("3.2"))
(set #OldVer ("3.0"))
(set #Demo ("Demo"))
;================================= ENGLISH ==================================;
(set languages-default 1)
(set #welc (cat "\n\nThis is a update for FDA\n"
"V 1.8-"#OldVer" Demo MC68020, to the "#Demo"-Version "#Ver".\n\n"
))
(set #whereprogFDA ("Where is `FDA` installed ?\n\"SYS:WBStartup\" will be updated automaticly."))
(set #whereprogFDAView ("Where is `FDAView` installed ?"))
(set #whereprogFDAPref ("Where is `FDAPref` installed ?"))
(set #whereprogFDAdoc ("Choose the `FDAdoc` drawer ?"))
(set #helpwhereprog ("The MainDirectory of the Program, which will be updated."))
(set #patch1_1 (cat "\n\nNow, patching file `")) ;Dateiname wird eingefügt
(set #patch1_2 (cat "`\nfrom V")) ;Alte Version wird eingefügt
(set #patch1_3 (cat " to V")) ;Neue Version wird eingefügt
(set #patch1_4 (cat " ."))
(set #ErrorMsg1_1 "\n\nError while patching file `") ;Dateiname wird eingefügt
(set #ErrorMsg1_2 "`.\n\n\n")
(set #ErrorMsg1_21 "case 1 its alright the Version") ;Neue Version wird eingefügt
(set #ErrorMsg1_3 (cat " or higher"
"\ncase 2 this Version is not patchable... Are there files i.e. FDAV2.0?"))
(set #ErrorMsg1_4 "can`t locate File. Are there files i.e. FDAV2.0?")
;===[ German Documentation ]=================================================
(if (= @language "deutsch")
(
(set languages-default 2)
(set #welc (cat "\n\nDies ist ein Update für FDA\n"
"V 1.8-"#OldVer" Demo MC68020, zur "#Demo"-Version "#Ver".\n\n"
))
(set #whereprogFDA ("In welchem Verzeichnis ist `FDA` installiert ?\n\"SYS:WBStartup\" wird automatisch geupdated."))
(set #whereprogFDAView ("In welchem Verzeichnis ist `FDAView` installiert ?"))
(set #whereprogFDAPref ("In welchem Verzeichnis ist `FDAPref` installiert ?"))
(set #whereprogFDAdoc ("Wähle das Verzeichnis `FDAdoc` aus ?"))
(set #helpwhereprog ("Das Hauptverzeichnis des Programmes, das upgedatet werden soll."))
(set #patch1_1 "\n\nJetzt wird die Datei `") ;Dateiname wird eingefügt
(set #patch1_2 "`\nvon V") ;Alte Version wird eingefügt
(set #patch1_3 " zur V") ;Neue Version wird eingefügt
(set #patch1_4 " umgewandelt.")
(set #ErrorMsg1_1 "\n\nDas Patchen der Datei `") ;Dateiname wird eingefügt
(set #ErrorMsg1_2 "`\n ist fehlgeschlagen !!!\n\n\n")
(set #ErrorMsg1_21 "Es ist bereits die Version ") ;Neue Version wird eingefügt
(set #ErrorMsg1_3 (cat " oder höher"
"\noder diese Version ist nicht Updateberechtigt... Sind Files wie z.B. FDAV2.0 vorhanden?"))
(set #ErrorMsg1_4 "File ist nicht ausfindig zu machen. Sind Files wie z.B. FDAV2.0 vorhanden?")
)
)
;-------------------------------------------------
; Vergleiche Versionen, und patche die Datei
; Verzeichnis, Datei, Neue Versionsnummer
;-------------------------------------------------
(procedure Update #dir #dat #nver
(set #dat2 (tackon #dir #dat))
(working (cat #patch1_1 #dat #patch1_2 #OldVer #patch1_3 #nver #patch1_4))
(if (= (exists #dat2) 1)
(if (= (exists (cat #dat2 "V" #OldVer)) 0)
(COPYFILES (SOURCE #dat2)
(DEST #dat2)
(NEWNAME (cat #dat2 "V" #OldVer))
(PROMPT "Backup V" #OldVer)
(SAFE)
)
)
)
(if (= (exists #dat2) 1)
(
(rename #dat2 (cat #dat2".old") (safe))
(set #cmd (cat "gpatch >\"CON:0/16/570/26/GPatch\" \""#dat2".old\" "#dat".patch \""#dat2 "\"" " RECURSIVE") )
(MESSAGE #cmd)
(set #patch (RUN #cmd (SAFE)))
(if (> #patch 0) (rename (cat #dat2".old") #dat2 (safe)))
(if (> #patch 0) (if (= (exists (cat #dat2 "V" #OldVer)) 1)
(
(set #cmd (cat "gpatch >\"CON:0/16/570/26/GPatch\" \""#dat2"V" #OldVer "\" "#dat".patch \""#dat2 "\"" " RECURSIVE") )
(MESSAGE #cmd)
(set #patch (RUN #cmd (SAFE)))
(if (> #patch 0) (message (cat #ErrorMsg1_1 #dat #ErrorMsg1_2 #ErrorMsg1_21 #nver #ErrorMsg1_3) (ALL)) )
)
)
)
(delete (cat #dat2".old") (safe))
)
(
(if (= (exists (cat #dat2 "V" #OldVer)) 1)
(
(set #cmd (cat "gpatch >\"CON:0/16/570/26/GPatch\" \""#dat2"V" #OldVer "\" "#dat".patch \""#dat2 "\"" " RECURSIVE") )
(MESSAGE #cmd)
(set #patch (RUN #cmd (SAFE)))
(if (> #patch 0) (message (cat #ErrorMsg1_1 #dat #ErrorMsg1_2 #nver #ErrorMsg1_3) (ALL)) )
)
(
(message (cat #ErrorMsg1_1 #dat #ErrorMsg1_2 #ErrorMsg1_4) (ALL))
)
)
)
)
)
;-------------------------------------------------
;Starte Update
;-------------------------------------------------
(complete 0)
(message #welc (ALL))
(welcome)
;-------------------------------------------------
;Frage nach Verzeichnis des Programmes
;-------------------------------------------------
(set @default-dest (askdir (prompt #whereprogFDA) (help #helpwhereprog) (default "SYS:System/")))
(complete 15)
;-------------------------------------------------
;Update Hauptprogramm
;-------------------------------------------------
(Update @default-dest "FDA" #Ver)
(complete 30)
(set @default-dest (askdir (prompt #whereprogFDAView) (help #helpwhereprog) (DEFAULT @default-dest)))
(IF (= (exists "SYS:WBStartup/FDA") 1)
(
(IF (= (exists "SYS:WBStartup/FDA.info") 1)
(
(working "updating SYS:WBStartup")
(DELETE "SYS:WBStartup/FDA" (OPTIONAL "FORCE") (DELOPTS (SAFE) ))
(set #rc (RUN "IconType SYS:WBStartup/FDA P" (SAFE)))
(TOOLTYPE (DEST "SYS:WBStartup/FDA")
(SETDEFAULTTOOL (TACKON @default-dest "FDA"))
(NOPOSITION)
(safe)
)
)
)
)
)
(DELETE (TACKON @default-dest "FDAV2.0") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(DELETE (TACKON @default-dest "FDAV2.2") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(DELETE (TACKON @default-dest "FDAV2.4") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(DELETE (TACKON @default-dest "FDAV2.6") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(DELETE (TACKON @default-dest "FDAV2.8") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(complete 45)
(Update @default-dest "FDAView" #Ver)
(DELETE (TACKON @default-dest "FDAViewV2.0") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(DELETE (TACKON @default-dest "FDAViewV2.2") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(DELETE (TACKON @default-dest "FDAViewV2.4") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(DELETE (TACKON @default-dest "FDAViewV2.6") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(DELETE (TACKON @default-dest "FDAViewV2.8") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(complete 60)
(set @default-dest (askdir (prompt #whereprogFDAPref) (help #helpwhereprog) (default "SYS:Prefs/")))
(complete 75)
(Update @default-dest "FDAPref" #Ver)
(DELETE (TACKON @default-dest "FDAPrefV2.0") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(DELETE (TACKON @default-dest "FDAPrefV2.2") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(DELETE (TACKON @default-dest "FDAPrefV2.4") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(DELETE (TACKON @default-dest "FDAPrefV2.6") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(DELETE (TACKON @default-dest "FDAPrefV2.8") (OPTIONAL "FORCE") (DELOPTS (SAFE) (INFOS)))
(complete 90)
(set @default-dest (askdir (prompt #whereprogFDAdoc) (help #helpwhereprog) (default "SYS:Prefs/FDAdoc")))
(COPYFILES (SOURCE "/FDA-News.readme") (DEST @default-dest))
(complete 100)
;-------------------------------------------------
;Fertig...
;-------------------------------------------------
(IF (= (exists "/FDA-News.readme") 1)
(set #rc (RUN "RUN SYS:Utilities/MultiView /FDA-News.readme"))
)
(exit)